package org.medicalinstrument.util;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @ClassName DateAndOrderID
 * @Description  用来获取时间戳和拼接订单号
 * @AUTHOR cirly
 * @DaTe 2018/10/28 10:45
 * @Version 1.0
 **/
public  class DateAndOrderID {
    public static String getfullDate(long l){

        Date date = new Date(l);
        SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");

        String nyr = dateFormat.format(date);
        return nyr;
    }

    public static String getDate(long l){

        Date date = new Date(l);
        SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmss");

        String nyr = dateFormat.format(date);
        return nyr;
    }
}
